{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# 1.介绍requests"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [],
   "source": [
    "import requests"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [
    {
     "ename": "SyntaxError",
     "evalue": "invalid syntax (<ipython-input-1-62c10565a7bb>, line 4)",
     "output_type": "error",
     "traceback": [
      "\u001b[1;36m  File \u001b[1;32m\"<ipython-input-1-62c10565a7bb>\"\u001b[1;36m, line \u001b[1;32m4\u001b[0m\n\u001b[1;33m    目标url [base url]\u001b[0m\n\u001b[1;37m                  ^\u001b[0m\n\u001b[1;31mSyntaxError\u001b[0m\u001b[1;31m:\u001b[0m invalid syntax\n"
     ]
    }
   ],
   "source": [
    "API实践步骤\n",
    "导入需要的requests模块\n",
    "输入我们需要API网站注册的API_Key\n",
    "目标url [base url]\n",
    "沿用API文档的示范代码,准备我们的headers和图片(数据)\n",
    "准备symbol ? 后面的数据,这里需要注意,一定要详细阅读API文档中的 “参数功能”,按照要求格式准备payload参数功能可能有:\n",
    "是否必要?必要的一定要准备好\n",
    "选填的一定是功能,要根据功能需求 好好填噢\n",
    "response响应。注意:\n",
    "详细阅读文档,注意请求方式(GET、POST、DELETE)\n",
    "注意json 和字典的差异 ,str vs dict"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.7.3"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
